<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>setAction</title>
		<script type="text/javascript" src="../load_lufylegend.js"></script>
	</head>
	<body>
			<div id="legend"></div>
			<script type="text/javascript">
				LInit(200,"legend",800,450,main);
				var player;
				var player2;
				function main(){
					var loader = new LLoader();
					loader.addEventListener(LEvent.COMPLETE, loadBitmapdata); 
					loader.load("player.png", "bitmapData");
				}
				function loadBitmapdata(event){
					var backLayer = new LSprite();
					addChild(backLayer);
					var list = LGlobal.divideCoordinate(480,630,3,4);
					var data = new LBitmapData(event.target,0,0,120,210);
					player = new LAnimation(backLayer,data,list);
					player2 = new LAnimation(backLayer,data.clone(),list);
					player.setAction(2,0,1,true);
					player2.setAction(2,0,1,false);
					player2.x = 150;
					backLayer.addEventListener(LEvent.ENTER_FRAME,onframe);
				}
				function onframe(){
					player.onframe();
					player2.onframe();
				}
			</script>
			
			
			
	</body>
</html>
